<div class="container_12 content-wrapper">
	
    <div class="grid_12">
    <h2>Featured Products</h2>
	<?php flash(); ?>
    <?php if(!empty($featured)):?>
    <ul class="product">
    	<?php 
		$ctr = 0;
		foreach($featured as $p):
			if($ctr >=2) $ctr = 0;		
		?>
        <li <?php echo $ctr%2 != 0 ? 'class="center"':'';?>>
    	<div class="ptitle"><?php echo $p->name; ?></div>
        <div class="pprice">PHP <?php echo number_format($p->price, 2); ?></div>
        <div class="pimage"><img src="<?php echo site_url().'/'.$p->image;?>" width="150px" height="150px"/></div>
        <p class="pdesc"><?php echo $p->description; ?> </p>
        <a href="<?php echo site_url('home/add_to_cart/'.$p->id);?>" class="add_to_cart">Add to cart</a>
        </li>
        
        <?php 
			$ctr++;
			endforeach;
		?>
    </ul>
    <?php endif;?>

    
 	
	</div>
</div>

  